package util;

import java.awt.Graphics2D;
import java.awt.RenderingHints;

public final class PaintUtilities {

	private PaintUtilities() {}

	/**
	 * Modifies the given Graphics2D object to paint with anti-aliasing and bilinear interpolation.
	 * @param g2 The Graphics2D object to modify
	 */
	public static void setUpGraphics(Graphics2D g2) {
		g2.setRenderingHint(
			RenderingHints.KEY_ANTIALIASING,
			RenderingHints.VALUE_ANTIALIAS_ON
		);

		g2.setRenderingHint(
			RenderingHints.KEY_INTERPOLATION,
			RenderingHints.VALUE_INTERPOLATION_BILINEAR
		);
	}
}
